package com.swe.chums.dao;

import com.swe.chums.dao.model.UserActivity;
import com.swe.chums.dao.model.UserActivityPk;
import com.swe.chums.dao.exceptions.UserActivityDaoException;
import java.util.Date;
import java.util.List;

public interface UserActivityDao
{
	/**
	 * Method 'insert'
	 * 
	 * @param dto
	 * @return UserActivityPk
	 */
	public UserActivityPk insert(UserActivity dto);

	/** 
	 * Updates a single row in the user_activity table.
	 */
	public void update(UserActivityPk pk, UserActivity dto) throws UserActivityDaoException;

	/** 
	 * Deletes a single row in the user_activity table.
	 */
	public void delete(UserActivityPk pk) throws UserActivityDaoException;

	/** 
	 * Returns all rows from the user_activity table that match the criteria 'id = :id'.
	 */
	public UserActivity findByPrimaryKey(int id) throws UserActivityDaoException;

	/** 
	 * Returns all rows from the user_activity table that match the criteria ''.
	 */
	public List<UserActivity> findAll() throws UserActivityDaoException;

	/** 
	 * Returns all rows from the user_activity table that match the criteria 'activity_type_id = :activityTypeId'.
	 */
	public List<UserActivity> findByActivityType(int activityTypeId) throws UserActivityDaoException;

	/** 
	 * Returns all rows from the user_activity table that match the criteria 'user_id = :userId'.
	 */
	public List<UserActivity> findByUser(int userId) throws UserActivityDaoException;

	/** 
	 * Returns all rows from the user_activity table that match the criteria 'web_resource_id = :webResourceId'.
	 */
	public List<UserActivity> findByWebResource(int webResourceId) throws UserActivityDaoException;

	/** 
	 * Returns all rows from the user_activity table that match the criteria 'id = :id'.
	 */
	public List<UserActivity> findWhereIdEquals(int id) throws UserActivityDaoException;

	/** 
	 * Returns all rows from the user_activity table that match the criteria 'user_id = :userId'.
	 */
	public List<UserActivity> findWhereUserIdEquals(int userId) throws UserActivityDaoException;

	/** 
	 * Returns all rows from the user_activity table that match the criteria 'activity_type_id = :activityTypeId'.
	 */
	public List<UserActivity> findWhereActivityTypeIdEquals(int activityTypeId) throws UserActivityDaoException;

	/** 
	 * Returns all rows from the user_activity table that match the criteria 'web_resource_id = :webResourceId'.
	 */
	public List<UserActivity> findWhereWebResourceIdEquals(int webResourceId) throws UserActivityDaoException;

	/** 
	 * Returns all rows from the user_activity table that match the criteria 'time = :time'.
	 */
	public List<UserActivity> findWhereTimeEquals(Date time) throws UserActivityDaoException;

	/** 
	 * Returns the rows from the user_activity table that matches the specified primary-key value.
	 */
	public UserActivity findByPrimaryKey(UserActivityPk pk) throws UserActivityDaoException;
        
        public List<UserActivity> findWhereUserAndActivityEquals(int userID, int activityTypeID) throws UserActivityDaoException;
}
